<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>
    <img src="../css基础/img/bg.png" height="561" width="1366"/>
    <button id="btn1">之前插入</button>
    <button id="btn2">之后插入</button>
    <script>
        $("#btn1").click(function () {
            $('img').after('<h1>I love jQuery</h1>');
        });
        $("#btn2").click(function () {
            $('img').before('<i>前面是一张图片</i>');
        });
    </script>
</body>
</html>